package xyz.hubery.mappers;

import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import xyz.hubery.domain.AdminBank;
import xyz.hubery.dto.AdminBankDTO;

import java.util.List;

@Mapper(componentModel = "spring")
public interface AdminBankMappers {

    AdminBankMappers INSTANCE = Mappers.getMapper(AdminBankMappers.class);


    // 定义对象转换方法

    /**
     * 实体类转DTO
     * @param adminBank
     * @return
     */
    AdminBankDTO toDTO(AdminBank adminBank);

    /**
     * DTO转实体类
     * @param dto
     * @return
     */
    AdminBank dtoToEntity(AdminBankDTO dto);

    List<AdminBankDTO> toDTO(List<AdminBank> adminBanks);

    List<AdminBank> dtoToEntity(List<AdminBankDTO> adminBanks);
}
